<?php
	defined('_JEXEC') or die('Restricted access');
	require_once(CUTEENGINE_BASE_FIELD_PATH."base_field_class.php");
    
	//
    // t_field_title
    //
	class t_field_title extends t_base_field
	{
        
        // property declaration
		// protected

        // property declaration
		// public
		// G
		const language_position_last = 1;
		
		// P
        const proper_properties_position_per_label_value = 1;
		const proper_properties_position_per_title_number = 2;
		const proper_properties_position_per_url_parameter_number = 3;
		const proper_properties_position_per_url_parameter_argument_number = 4;
        const proper_properties_position_last = 5;
        // method declaration
    	// protected

		
        // G
		protected function get_field_event_script($a_event_type,$a_argouments)
        {			
			$local_return = '';
			return $local_return;
		}
static function get_help_proper_property($a_index)
		{
			$local_return = 'NO HELP AVAILABLE';
			/*switch ($a_index) 
            {
                case self::proper_properties_position_:
					$local_return = '';
				break;                
			}*/
			return $local_return;
		}
        static function get_default_proper_property($a_index)
		{
			$local_return = '';
			/*switch ($a_index) 
            {
                case self::proper_properties_position_:
					$local_return = 'TRUE';
				break;                
			}*/
			return $local_return;
		}
		protected function get_proper_properties_position_last()      
		{
            return self::proper_properties_position_last;
        }
		
        // method declaration
    	// public
        public function __construct($a_parent_part,$a_common_properties_str, $a_proper_properties_str)
		{
            parent::__construct($a_parent_part,$a_common_properties_str, $a_proper_properties_str);
            
			
		}

		// C
		public function create_javascript_initialization_component()
		{
		
		}		
        public function create_tags_structure()
        {
            global $g_url_parameters_namespace;
			//echo __METHOD__."<BR>";
            parent::create_tags_structure();
            $local_name = $this->common_properties_array[t_base_field::common_properties_position_per_field_name];
            $local_type = t_base_tag_type::btt_h1;
			if ($this->proper_properties_array[self::proper_properties_position_per_title_number] == 2) 
				$local_type = t_base_tag_type::btt_h2;
			else if ($this->proper_properties_array[self::proper_properties_position_per_title_number] == 3) 
				$local_type = t_base_tag_type::btt_h3;	
			$local_current_tag = parent::add_tag($local_type,
                $local_name);
			$this->main_tag = $local_current_tag;
			$local_parameter = $g_url_parameters_namespace->get_parameter_by_position(
				$this->proper_properties_array[self::proper_properties_position_per_url_parameter_number]);
			if (isset($local_parameter))
				$local_argument = $local_parameter->get_argument_value($this->proper_properties_array[self::proper_properties_position_per_url_parameter_argument_number]);
			else
				$local_argument = '';
			$this->main_tag->set_text_to_include(
                $this->proper_properties_array[self::proper_properties_position_per_label_value].$local_argument);
				 
            $this->default_start_tag = $this->main_tag;
            $this->default_result_tag = $this->main_tag;
            
            
        }
        // G
        // G
		public function get_included_in_html_structure($a_name,$a_display,$a_key_tag_name)
		{
			parent::get_included_in_html_structure($a_name);
			if ($a_display)
			{
				$this->main_tag->add_style_property('display','');
				
			}
			else
			{
				$this->main_tag->add_style_property('display','none');

			}	
			
			$this->key_tags_list[$a_name] = $a_key_tag_name;
			//echo "a_name: $a_name - a_key_tag_name: $a_key_tag_name<br>";
			$local_label_script = '';
			//	
			return ($this->main_tag->generate_html_code_with_new_name($a_name));
			
			
		}	

		public function get_included_in_html_structure_no_edit_mode($a_id,$a_value,$a_label_value)
		{
			$this->main_tag->add_style_property('display','');
			$this->main_tag->set_text_to_include($a_value);
			//echo "a_id: $a_id - a_value: $a_value - a_label_value:$a_label_value<br>";
			return $this->main_tag->generate_html_code_with_new_name($a_id);
		}		
		public function get_language_position_last()
        {
            return self::language_position_last;
        }
		public function get_result_action_script($a_event_type,$parent_event_type,
            $a_parameter,$a_content_loader_result)
		{
            return '';
        }		
		
// I
		public function initialize_field_event($a_event_type)
        {			
			
		}
        
       

		

    }
?>    